package com.heima.common.exception;


import com.heima.common.enums.AppHttpCodeEnum;
import lombok.Data;

@Data
public class LeadException extends RuntimeException{

    private Integer status;


    public LeadException(Integer status,String message) {
        super(message);
        this.status = status;
    }

    public LeadException(Integer status,String message, Throwable cause) {
        super(message, cause);
        this.status = status;
    }

    public LeadException(AppHttpCodeEnum enums) {
        super(enums.getErrorMessage());
        this.status = enums.getCode();
    }

}
